 {include h}


<div class="container">
  <div id="main">
    <!--{hook t_top_left_box}-->
    <!--{hook t_thread_index_top_left_box}-->
    <div class="wrap-box">
      <a href="{#WWW}">{$_LANG['论坛首页']}</a>
      
      <?php $tmp_fid = forum($forum,$thread_data['fid'],'fid'); ?>
   
<?php
$tmp_str = '';
  while ($tmp_fid != -1) { 
    $tmp_str='<span class="dhsp"> > </span><a href="' .HYBBS_URLA('forum','',forum($forum,$tmp_fid,'id')).'">'.forum($forum,$tmp_fid,'name').'</a>'.$tmp_str;
    if(forum($forum,$tmp_fid,'fid') != -1){
      $tmp_fid = forum($forum,$tmp_fid,'fid');
    }else{
      break; 
    }
  }
  echo $tmp_str;
?>



      <span class="dhsp"> > </span> 
      <a href="{php HYBBS_URL('forum','',forum($forum,$thread_data['fid'],'id'))}">{php echo forum($forum,$thread_data['fid'],'name');}</a>
    </div>
    <div class="h-20"></div>
    
    <div class="wrap-box t-info">
      <div class="head">
        <h1>
          {$thread_data.title}{if $thread_data['state']}<span title="{$_LANG['禁止回复']}" style="    color: brown;"> - {$_LANG['已锁定']}</span>{/if}
        </h1>
        <div class="meta">
          <a href="{php HYBBS_URL('my',$thread_data['user']);}" target="_blank">
            {$thread_data.user}
          </a>
          &nbsp;&nbsp;·&nbsp;&nbsp;{php echo humandate($thread_data['atime']);}
          &nbsp;&nbsp;·&nbsp;&nbsp;
          <a href="{php HYBBS_URL('forum',$thread_data['fid']);}" >
            
            {php echo forum($forum,$thread_data['fid'],'name');}
          </a>
        </div>
        <a href="{php HYBBS_URL('my',$thread_data['user']);}" class="avatar" target="_blank">
          <img src="{#WWW}{$thread_data.avatar.b}" pos="left" width="60" height="60" class="circle js-info" uid="{$thread_data.uid}">
        </a>
      </div>
      <div class="content typo editor-style">
        <!--{hook t_thread_content_top}-->
        {if $thread_data['show'] && $thread_data['gold_show']}
      	{$post_data.content}
        {else}
          {if $thread_data['gold_show']}
          <blockquote style="color: #B75C5C;font-weight: bold;">
          {$_LANG['内容隐藏提示']}
          </blockquote>
          {else}
          <blockquote style="color: #B75C5C;font-weight: bold;">
          {$_LANG['付费可见']} <a href="javascript:void(0);" onclick="buy_thread({$thread_data['tid']},{$thread_data['gold']})">({$_LANG['点击购买']})</a> {$_LANG['售价']}：{$thread_data['gold']} {$_LANG['金币']}
          </blockquote>
          {/if}
        {/if}
        <!--{hook t_thread_content_bottom}-->
      </div>
      <div class="actions">

        <a href="javascript:void(0);" class=""  onclick="tp('thread1',{$thread_data.tid},this)">
            {$_LANG['支持']}&nbsp;&nbsp;<span style="padding:0">{$thread_data.goods}</span>
        </a>
        <span class="grey">|</span>
        <a href="javascript:void(0);" class="" onclick="tp('thread2',{$thread_data.tid},this)">
            {$_LANG['反对']}&nbsp;&nbsp;<span style="padding:0">{$thread_data.nos}</span>
        </a>
        {if IS_LOGIN } 
          <?php $arr = explode(",",forum($forum,$thread_data['fid'],'forumg')); ?>
            {if $thread_data['uid'] == NOW_UID || NOW_GID == C("ADMIN_GROUP") || is_forumg($forum,NOW_UID,$thread_data['fid'])}
            <span class="grey">|</span>
            <a class="" href="{php HYBBS_URL('post','edit',['id'=>$post_data['pid']]); }">{$_LANG['编辑']}</a>
          
            <span class="grey">|</span>
            <a href="javascript:void(0);" class="" onclick="del_thread({$thread_data.tid},'thread')" >{$_LANG['删除主题']}</a>

            <span class="grey">|</span>
            <a href="javascript:void(0);" class="" onclick="set_state({$thread_data.tid},{$thread_data.state})" >{if $thread_data['state']}{$_LANG['解锁帖子']}{else}{$_LANG['锁定帖子']}{/if}</a>

            {/if}
            {if NOW_GID == C("ADMIN_GROUP")}
            <span class="grey">|</span>
                {if $thread_data['top'] == 1}

                <a href="javascript:void(0);" class="" onclick="thread_top({$thread_data.tid},'off',1)" >{$_LANG['取消板块置顶']}</a>
                {else}
                <a href="javascript:void(0);" class="" onclick="thread_top({$thread_data.tid},'on',1)" >{$_LANG['板块置顶']}</a>
                {/if}

            
                <!-- 管理员权限 -->
                <span class="grey">|</span>
                {if $thread_data['top'] == 2}
                <a href="javascript:void(0);" class="" onclick="thread_top({$thread_data.tid},'off',2)" >{$_LANG['取消全站置顶']}</a>
                {else}
                <a href="javascript:void(0);" class="" onclick="thread_top({$thread_data.tid},'on',2)" >{$_LANG['全站置顶']}</a>
                {/if}

            {/if}
            {if is_forumg($forum,NOW_UID,$thread_data['fid']) }
                <span class="grey">|</span>
                {if $thread_data['top'] == 1}
                <a href="javascript:void(0);" class="" onclick="thread_top({$thread_data.tid},'off',1)" >{$_LANG['取消板块置顶']}</a>
                {else}
                <a href="javascript:void(0);" class="" onclick="thread_top({$thread_data.tid},'on',1)" >{$_LANG['板块置顶']}</a>
                {/if}
            {/if}


          {/if}



        <!-- <span class="pull-right grey-dark">
          1 人收藏
        </span> -->
      </div>
      

    </div>
    {if $thread_data['files']}
    <div class="h-20"></div>
    <div class="wrap-box">
    <h2 style="border-bottom: solid #E6E6E6 1px;padding-bottom: 10px;">{$_LANG['附件列表']}</h2>
     {foreach $filelist as $v}
     {if $v['show']}
      <p style="padding:10px 0;font-size:18px">
        <a href="javascript:void(0);" onclick="hy_downfile({$v.fileid})">{$v.name}</a>
        <i style="color: grey;    font-size: 14px;">&nbsp;&nbsp;{$_LANG['文件大小']}:{php echo round($v['size']/1024/1024,3);}M ({$_LANG['下载次数']}：{$v.downs})</i>
        {if $v['gold']}
        <span style="color: brown;"> &nbsp;&nbsp;{$_LANG['售价']}:{$v.gold}</span>
        {/if}
      </p>
      {else}
      <p style="padding:10px 0;font-size:18px">
        <a href="javascript:void(0);" style="color: #c31d1d;">{$_LANG['附件隐藏']}</a>
      </p>
     {/if}
     {/foreach}
    </div>
    {/if}

    <div class="h-20"></div>
    <div class="typo comments">
      <div class="wrap-box comment-list">
        <div class="head">
          {$thread_data.posts} {$_LANG['条回复']} &nbsp;
          <span class="grey">|</span>
          &nbsp;{$_LANG['直到']} {php echo humandate($thread_data['btime']);}
          <span class="grey">|</span>
          {$thread_data['views']} {$_LANG['次浏览']}
          {if !empty($PostList)}
          <div class="pull-right">
            <a href="{php HYBBS_URL('thread',$thread_data['tid'])}?order=desc">{$_LANG['最新回复']}</a>
            <span class="grey">|</span>
            <a href="{php HYBBS_URL('thread',$thread_data['tid'])}">{$_LANG['最早回复']}</a>
          </div>
          {/if}
        </div>
		{foreach $PostList as $k => $v}
        <div class="item">
          <a name="reply26"></a>
          <a href="{php HYBBS_URL('my',$v['user']);}" class="avatar" target="_blank">
            <img class="circle js-unveil js-info" uid="{$v.uid}" pos="right" src="{#WWW}{$v.avatar.b}">
          </a>
          <div class="r">
            <p class="meta">
              <a href="{php HYBBS_URL('my',$v['user']);}" class="author" target="_blank">
                {$v.user}
              </a>
              <span class="time">
                {$v.atime_str}
              </span>
              <span class=" pull-right" >
                <a href="javascript:void(0);" class="" onclick="tp('post1',{$v.pid},this)">
                    {$_LANG['支持']}&nbsp;&nbsp;<span style="padding:0">{$v.goods}</span>
                </a>
                <span class="grey">|</span>
                <a href="javascript:void(0);" class="" onclick="tp('post2',{$v.pid},this)">
                    {$_LANG['反对']}&nbsp;&nbsp;<span style="padding:0">{$v.nos}</span>
                </a>

                {if IS_LOGIN }

                    
                    {if $v['uid'] == NOW_UID || NOW_GID == C("ADMIN_GROUP")}
                        <!-- 帖子作者 或者 管理员 -->
                        <span class="grey">|</span>
                        <a class="" href="{php HYBBS_URL('post','edit',['id'=>$v['pid']]); }">{$_LANG['编辑']}</a>
                    {/if}
                    {if $v['uid'] == NOW_UID || NOW_GID == C("ADMIN_GROUP") || is_forumg($forum,NOW_UID,$thread_data['fid'])}
                        <!-- 作者 与 管理员 判断 -->
                        <span class="grey">|</span>
                        <a href="javascript:void(0);" class="" onclick="del_thread({$v.pid},'post')" >{$_LANG['删除帖子']}</a>
                    {/if}
                    
                {/if}
              </span>

            </p>
            <div class="text typo editor-style">
            <!--{hook t_post_content_top}-->
              {$v.content}
            <!--{hook t_post_content_bottom}-->
            </div>
          </div>

        </div>
        {/foreach}
      </div>
      {if !empty($PostList)}
      <div class="h-20"></div>
      <div class="wrap-box">
      <!--{hook t_thread_index_page_top}-->
        <a href="{if $pageid==1}javascript:void(0);{else}{php HYBBS_URL('thread',$thread_data['tid'], $pageid-1);}{php echo X("get.order")?"?order=desc":'';}{/if}"  class="btn bg-primary {if $pageid==1}disabled{/if}" >{$_LANG['上一页']}</a>
			<a href="{if $pageid==$page_count}javascript:void(0);{else}{php HYBBS_URL('thread',$thread_data['tid'], $pageid+1);}{php echo X("get.order")?"?order=desc":'';}{/if}" class="btn bg-primary large pull-right {if $pageid==$page_count}disabled{/if}" >{$_LANG['下一页']}</a>
      <!--{hook t_thread_index_page_bottom}-->
	  </div>
    {/if}
	  <div class="h-20"></div>
      <div class="wrap-box">
      <!--{hook t_post_editer_top}-->
        {if IS_LOGIN}
            <!--{hook t_thread_index}-->
        {else}
            <a href="{php HYBBS_URL('user','login')}">{$_LANG['登录']}</a>{$_LANG['后才可发表内容']}
        {/if}
      <!--{hook t_post_editer_bottom}-->

      </div>
      </div>
	  {include r_m}

</div>
</div>
{include f}
